package eventplanner.rest;

import eventplanner.ejb.ServiceFacade;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/groups")
public class GroepsRestService {

	@Inject
	private ServiceFacade facade;

	@GET
	@Produces(MediaType.APPLICATION_JSON)
	public Response getGroups() {
		return Response.ok(facade.getAllGroups()).build();
	}
}
